Line Plot
df.plot(kind='line', x = data_col, y=data_col)
Creates a line plot using a DataFrame.
- Input:
- kind : string
- To create a scatter plot, use kind='line'
- x : label
- Column for horizontal coordinates of each point.
- y : label
- Column for vertical coordinates of each point..
- Returns:
- Matplotlib plot created using parameters.
- Return Type:
- Matplotlib plot
pets.sort_values(by='Age').plot(kind='line', x='Age', y='Weight')